package com.example.springdemotest.mapper;

import com.example.springdemotest.bean.Photo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.Date;

@Mapper
public interface PhotoMapper {

    @Insert("insert into photo values(#{id},#{name},#{path},#{upload_date})")
    int insert_photo(int id, String name, String path, Date upload_date);


    @Select("select * from photo where id= #{id}")
    Photo select(int id);
}
